package com.bw.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bw.dao.RoleResourceMapper;
import com.bw.entity.RoleResource;
import com.bw.service.RoleResourceService;

@Service(value = "roleResourceService")
public class RoleResourceServiceImpl implements RoleResourceService {

    @Autowired
    private RoleResourceMapper<RoleResource>roleResourceMapper;
    
    @Override
    public Integer insertSelective(RoleResource roleResource) throws Exception {
           return this.roleResourceMapper.insertSelective(roleResource);
        }

    @Override
    public Integer insertBatch(List<RoleResource> roleResource) throws Exception {
           return this.roleResourceMapper.insertBatch(roleResource) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.roleResourceMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.roleResourceMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(RoleResource roleResource) {
           return this.roleResourceMapper.updateByPrimaryKeySelective(roleResource);
    }

    @Override
    public RoleResource findById(Object id) {
           return (RoleResource) this.roleResourceMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<RoleResource> selectByCondition(RoleResource roleResource) {
           return (List<RoleResource>) this.roleResourceMapper.selectByCondition(roleResource);
    }

    @Override
    public Integer selectCountByCondition(RoleResource roleResource) {
           return  this.roleResourceMapper.selectCountByCondition(roleResource);
    }

}
